<template>
	<view style="color:#fbffef">
		<view v-for="item in newsList" >
			<cardT v-if="item.top==true" :title="item.title" :time="item.time" :category="item.category"
					:views="item.views" :description="item.description" :top="item.top">
			</cardT>
		</view>
		<view v-for="item in newsList" class="home_newsList">
			<card v-if="item.top==false" :title="item.title" :image="item.image" :time="item.time" :category="item.category"
					:views="item.views" :description="item.description" :top="item.top">
			</card>
		</view>

	</view>
</template>

<script>
	import card from '../../../components/newsCard.vue'
	import cardT from '../../../components/cardTop.vue'
	import newsData from '../../../Data/news.json'
	export default {
		components: {
			card,
			cardT
		},
		data() {
			return {
				newsList: newsData
			}
		},
		onLoad() {
			
		},
		methods: {
			
			
		}
	}
</script>

<style>
	.home_top{
		background-color: #ffffff;
		margin: 20rpx;
		padding: 20rpx;
		height: 180rpx;
		border-radius: 20rpx;
		color: #cacaca;
		border: 2rpx solid #d8d8d8;
	}
	.home_newsList{

	}
</style>